/**
 * pharma-model - 9 janv. 2011 guillaume
 */
package org.bspv.pharma.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Version;
import javax.validation.constraints.NotNull;

/**
 * @author guillaume
 */
@Entity
@Table(name = "STANDARD_EQUIPMENT_DETAIL")
public class StandardEquipmentDetail implements Serializable {

    /**
     * serialVersionUID.
     */
    private static final long serialVersionUID = 1L;

    /**
     * Détail d'arment vide.
     */
    public static final StandardEquipmentDetail EMPTY_STANDARD_EQUIPMENT_DETAIL = new StandardEquipmentDetail();

    /**
     * Identifiant du détail d'armement type.
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    /**
     * Armement type auquel se rapporte ce détail.
     */
    @NotNull
    @ManyToOne
    private StandardEquipment standardEquipment;
    /**
     * Type de fourniture.
     */
    @NotNull
    @ManyToOne
    private TypeOfSupply typeOfSupply;
    /**
     * Quantité idéale maximum.
     */
    @NotNull
    private Integer idealMaxQuantity;
    /**
     * Quantité idéale minimum.
     */
    @NotNull
    private Integer idealMinQuantity;
    /**
     * Quantité limite.
     */
    @NotNull
    private Integer limitQuantity;
    /**
     * Quantité critique.
     */
    @NotNull
    private Integer criticalQuantity;
    /**
     * Numéro de version.
     */
    @Version
    private Integer version;

    /**
     * @return the id
     */
    public final Long getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public final void setId(final Long id) {
        this.id = id;
    }

    /**
     * @return the standardEquipment
     */
    public final StandardEquipment getStandardEquipment() {
        return standardEquipment;
    }

    /**
     * @param standardEquipment
     *            the standardEquipment to set
     */
    public final void setStandardEquipment(final StandardEquipment standardEquipment) {
        this.standardEquipment = standardEquipment;
    }

    /**
     * @return the typeOfSupply
     */
    public final TypeOfSupply getTypeOfSupply() {
        return typeOfSupply;
    }

    /**
     * @param typeOfSupply
     *            the typeOfSupply to set
     */
    public final void setTypeOfSupply(final TypeOfSupply typeOfSupply) {
        this.typeOfSupply = typeOfSupply;
    }

    /**
     * @return the idealMaxQuantity
     */
    public final Integer getIdealMaxQuantity() {
        return idealMaxQuantity;
    }

    /**
     * @param idealMaxQuantity
     *            the idealMaxQuantity to set
     */
    public final void setIdealMaxQuantity(final Integer idealMaxQuantity) {
        this.idealMaxQuantity = idealMaxQuantity;
    }

    /**
     * @return the idealMinQuantity
     */
    public final Integer getIdealMinQuantity() {
        return idealMinQuantity;
    }

    /**
     * @param idealMinQuantity
     *            the idealMinQuantity to set
     */
    public final void setIdealMinQuantity(final Integer idealMinQuantity) {
        this.idealMinQuantity = idealMinQuantity;
    }

    /**
     * @return the limitQuantity
     */
    public final Integer getLimitQuantity() {
        return limitQuantity;
    }

    /**
     * @param limitQuantity
     *            the limitQuantity to set
     */
    public final void setLimitQuantity(final Integer limitQuantity) {
        this.limitQuantity = limitQuantity;
    }

    /**
     * @return the criticalQuantity
     */
    public final Integer getCriticalQuantity() {
        return criticalQuantity;
    }

    /**
     * @param criticalQuantity
     *            the criticalQuantity to set
     */
    public final void setCriticalQuantity(final Integer criticalQuantity) {
        this.criticalQuantity = criticalQuantity;
    }

    /**
     * @return the version
     */
    public final Integer getVersion() {
        return version;
    }

    /**
     * @param version
     *            the version to set
     */
    public final void setVersion(final Integer version) {
        this.version = version;
    }

}
